﻿<script language="javascript" type="text/javascript" src="<?php echo base_url().'assets/tiny_mce/tiny_mce.js'; ?>"></script>
<script language="javascript" type="text/javascript">
  tinyMCE.init({
	mode : "exact",
    theme : "advanced",
	plugins : "advimage,advlink,media,contextmenu,paste,insertdatetime,table,emotions,pagebreak",
    editor_deselector : "NoEditor",
    entity_encoding : "raw",
    elements : "ccontent",
	width : 700,
	height : 400,
    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,fontsizeselect,forecolor,backcolor,link,unlink,anchor,image,separator,code",
    theme_advanced_buttons2 : "pastetext,pasteword,|,hr,separator,sub,sup,separator,outdent,indent,undo,redo,tablecontrols",

    theme_advanced_buttons3 : "",
    theme_advanced_buttons4 : "",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    convert_urls : false,
    file_browser_callback : 'ajaxfilemanager',
    accessibility_warnings : false
  });
   /*function ajaxfilemanager (field_name, url, type, win) 
   {
	   var fileBrowserWindow = new Array();
	   fileBrowserWindow['title'] = 'File Browser';
	   //fileBrowserWindow['file'] = "my_cms_script.php" + "?type=" + type;
	   fileBrowserWindow['file'] = "plugins/ajaxfilemanager/ajaxfilemanager.php" + "?type=" + type;
	   fileBrowserWindow['width'] = '420';
	   fileBrowserWindow['height'] = '400';
	   tinyMCE.activeEditor.windowManager.open(fileBrowserWindow, { window : win, resizable : 'yes', inline : 'yes' });
	   return false;
   }*/

	function ajaxfilemanager(field_name, url, type, win) {
		/*var ajaxfilemanagerurl = "../../../../assets/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php";
		switch (type) {
			case "image":
				break;
			case "media":
				break;
			case "flash": 
				break;
			case "file":
				break;
			default:
				return false;
		}*/
		tinyMCE.activeEditor.windowManager.open({
			url: "../../../../assets/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php",
			width: 750,
			height: 400,
			inline : "yes",
			close_previous : "no"
		},{
			window : win,
			input : field_name
		});
	}
</script>
<div id="pagecontent">
<div id="add" style="cursor:pointer; float:right; font-weight:bold; color:#FF0066; "><span onclick="javascript: submitbutton('save')" id="actionname" style="text-decoration:overline">UPDATE</span> <img  src="<?php echo base_url(); ?>assets/img/icon-32-new.png" title="<?php echo $this->lang->line('m_addmenu'); ?>" align="absmiddle"/> </div>
<?php 
	if($this->session->flashdata('message')!='')
	{ 
		
?>
<div id="sponsorAdDiv" style="visibility:hidden">
<table width="305px" height="50px" bgcolor="#FF0000"><tr><td>
<table width="300px" height="45px" bgcolor="#FFFFCC"><tr><td align="center" valign="middle">
<?php echo $this->session->flashdata('message'); ?>
</p>
</td></tr></table></td></tr></table>
</div>
<?php
	}
?>
<div id="addbigcontent">
  <div id='addmenu'> 
<form action="<?php echo base_url().index_page(); ?>/adminpage/cpanel/update_history" method="post" name="adminForm" id="adminForm" autocomplete="off" enctype="multipart/form-data">
    <fieldset style="border:none">
    <div id="addnew"><div align="center" class="error_validate" id="error_message"></div>
<?php 
				foreach($information_manager as $row)
				{
?>					
      <div>
        <label for="ccontent">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Content</label>
        <textarea id="ccontent"  name="content" cols="80" rows="8"><?php echo $row['description']; ?></textarea>
      </div>
    </div>
    <input type="hidden" id="id" name="id" value="<?php echo $row['information_id']; ?>" />
	<input type="hidden" name="task" value="" />
<?php
				}
?> 	
    <div class="toolbar"  align="center">
      <table width="160px" border="0" align="center" cellpadding="5">
        <tr>
          <td align="center"><div id="mybutton" onclick="javascript: submitbutton('save')"><a href="#"><span class="icon-32-save" title="Update"></span>Update</a></div></td>
          <td align="center"><div id="mybutton2"><a href="<?php echo base_url().index_page()."/adminpage/cpanel/"; ?>"><span class="icon-32-cancel" title="Cancel"> </span>Cancel</div></a></td>
        </tr>
      </table>
    </div>
  </fieldset>
</form><div align="center"><br /><hr width="400px" /><br /></div>

  </div> 
  <br />
</div>
</div>
<script>

function checkvalidate() 
{
		return 1;
}
</script>